package de.kardass.jsmatep;

import java.util.Calendar;
import java.util.Date;

import de.kardass.jsmatep.util.UrlUtil;

/**
 * Abstract test class for jSmaTeP related test cases.
 *
 * @author Manfred Kardass (manfred@kardass.de)
 *
 */
public abstract class JsmatepTestCase {

	protected String packageToRealPath() {
		return UrlUtil.packageToRealPath(getClass());
	}
	
	protected Date getDate(int year, int month, int dayOfMonth) {
		final Calendar cal = Calendar.getInstance();
		cal.set(Calendar.YEAR, year);
		cal.set(Calendar.MONTH, month);
		cal.set(Calendar.DAY_OF_MONTH, dayOfMonth);
		cal.set(Calendar.HOUR_OF_DAY, 0);
		cal.set(Calendar.MINUTE, 0);
		cal.set(Calendar.SECOND, 0);
		cal.set(Calendar.MILLISECOND, 0);
		return cal.getTime();
	}
	
}
